<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        list-style-type: none;
      }
      ul {
        width: 600px;
        height: 44px;
        margin: 100px auto;
        overflow: hidden;
      }
      li {
        /*display: inline-block;
            /*显示在一行 但两两之间会产生一个距离 需要使用margin-left通过给负值处理*/
        float: left; /*通过浮动使其在一行*/
        width: 100px;
        text-align: center;
        background-color: rgb(53, 163, 163);
        color: #fff;
      }
      li:hover {
        background-color: green;
        opacity: 0.5;
        filter: alpha(opacity=50); /*兼容处理IE8及以下的版本*/
        color: aqua;
      }
    </style>
  </head>
  <body>
    <ul>
      <li>菜单项1</li>
      <li>菜单项2</li>
      <li>菜单项3</li>
      <li>菜单项4</li>
      <li>菜单项5</li>
    </ul>
  </body>
</html>
